<?php
namespace falcon5\inc;

use falcon5\inc\WPProviders\AdminMenuPage;
use falcon5\inc\WPProviders\AdminRedirect;
use falcon5\inc\WPProviders\MonoLogger;
use falcon5\inc\WPProviders\Proxy;
use falcon5\inc\WPProviders\AdminNotices;
use falcon5\inc\WPProviders\AdminScripts;
use falcon5\inc\WPProviders\LanguageSwitcherMenuItems;
use falcon5\inc\WPProviders\Route;
use falcon5\inc\WPProviders\RestRoute;
use falcon5\inc\WPProviders\FrontendScripts;
use falcon5\inc\WPProviders\LanguageSwitcherShortcode;
use falcon5\inc\WPProviders\SettingsLinks;

/**
 * @desc WP功能服务管理类
 * Class WPProviderManager
 * @package falcon5\inc
 */
class WPProviderManager
{
    /**
     * @return string[]
     * 
     * @desc 获取注册的服务
     */
    public static function getServiceProvider(): array
    {
        return [
            SettingsLinks::class,
            AdminMenuPage::class,
            FrontendScripts::class,
            Proxy::class,
            Route::class,
            RestRoute::class,
            AdminScripts::class,
            AdminNotices::class,
            LanguageSwitcherMenuItems::class,
            LanguageSwitcherShortcode::class,
            MonoLogger::class,
            AdminRedirect::class,
        ];
    }

    public static function instantiate($class)
    {
        return new $class;
    }
}